<?php
class Home extends MY_Frontend{
    
    public function __construct() {
        parent::__construct();
    }

    function index()
    {
        $this->session->set_userdata('REDIRECT' , uri_string()); 
        $this->load->model('tour_model'); 
        $this->data['top4']=$this->tour_model->get_limit(4);
        
        $this->load->model('category_model');
        $this->data['category']=$this->category_model->get_all();
        
        $this->layout->view('frontend/home', $this->data);  
    }
	function lang($lang)
	{
		if ($lang == "vn")
		{
			$_SESSION["LANG"] = "vn";
            $this->lang->load('vi','vietnamese');
		}else{
			$_SESSION["LANG"] = "en";
            $this->lang->load('en','english');
		}
		redirect($_SESSION["last_url"]);
	}    
}